Skip to content

docs(lark-drive): improve search evidence guidance#864

Open
BytedanceSearch wants to merge 1 commit into
mainfrom
eval-search-drive-routing-docs-a970
Open

docs(lark-drive): improve search evidence guidance#864
BytedanceSearch wants to merge 1 commit into
mainfrom
eval-search-drive-routing-docs-a970

Conversation

@BytedanceSearch
Copy link
Copy Markdown
Collaborator

@BytedanceSearch BytedanceSearch commented May 13, 2026

Summary

  • Clarify drive list/stat requests should use filtered empty-query browsing, not generic action words as keywords.
  • Replace fixed relative-date examples with runtime placeholders.
  • Add pagination, de-duplication, evidence validation, and query-expansion guidance for drive search.
  • Keep this PR scoped to skills/lark-drive/** only.

Eval Signal

Runs:

  • tests/eval-search/runs/2026-05-12T06-14Z-multientity-sandbox-a970
  • tests/eval-search/runs/2026-05-13Tfull-critical-info-sandbox

Observed:

  • Drive cases 014/015 need empty-query filtered browsing for list/stat requests and pagination before counting.
  • Drive case 019 needs content query expansion and non-polluted evidence validation.

Validation

  • git diff --check
  • PR diff is scoped to skills/lark-drive/**.

Docs-only change; no unit tests were run.

Summary by CodeRabbit

Release Notes

Documentation

  • Clarified distinction between using --query with keywords versus empty queries combined with filter flags for different request types.
  • Added standardized execution procedures for list, statistics, and content search requests.
  • Expanded examples and decision rules for query boundaries and time expressions.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 13, 2026

📝 Walkthrough

Walkthrough

Documentation update for the drive +search command clarifies how to use --query and filter flags for different request types. It adds guidance that list/statistics requests should use --query "" with filters, introduces step-by-step execution procedures, and strengthens decision rules around query boundaries, evidence verification, and calendar-based time expressions.

Changes

Drive Search Query Documentation

Layer / File(s) Summary
Query usage patterns and filter-driven search examples
skills/lark-drive/references/lark-drive-search.md
Introduces explicit --query constraints and expands the natural language command mapping table with examples showing how list/statistics/range requests combine empty --query with structured filters (ownership, time, type), warning against action/intent words in queries.
List/statistics and content search execution rules
skills/lark-drive/references/lark-drive-search.md
Documents step-by-step execution procedures for list/statistics requests (filter extraction, --query "" handling, result validation, pagination with deduplication, and field-based statistics grouping) and content search requests (query expansion with entities and topics, mandatory evidence preservation, evidence skipping prohibition).
Query boundaries, evidence verification, and time expressions
skills/lark-drive/references/lark-drive-search.md
Strengthens decision rules for --query boundaries (keywords only), evidence verification requirements (comparing returned doc_type and fields vs inferred titles), and clarifies time expression handling: relative time vs calendar-based expressions requiring absolute YYYY-MM-DD boundaries and runtime <YYYY-MM-DD> placeholder computation.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • larksuite/cli#221: Both PRs update documentation for search query syntax, adding/clarifying the rule that search keywords must be provided via --query (not positional keywords) and extending the "decision rules" around query usage.
  • larksuite/cli#865: Both PRs update documentation to enforce the same --query "" + structured filters pattern for activity/message listing or review flows (including evidence validation and pagination), but in different domains (lark-drive-search vs lark-im chat messages).
  • larksuite/cli#210: Both PRs update --query usage and "decision rules" for Feishu/Lark search (server-side query syntax vs filters/post-filtering), so the main PR's clarified --query/filter boundaries are in the same area as the retrieved PR's advanced Boolean + intitle: --query syntax guidance.

Suggested labels

documentation, domain/ccm

Suggested reviewers

  • fangshuyu-768

Poem

🐰 A rabbit hops through search paths wide,
Where queries dance with filters as their guide,
Empty strings and keywords in their place,
Time boundaries drawn with methodical grace! 🔍

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title 'docs(lark-drive): improve search evidence guidance' clearly summarizes the main change—documentation improvements for lark-drive search functionality—and is specific and actionable.
Description check ✅ Passed The PR description provides a clear summary of changes, documents eval signals with specific test run references, outlines validation steps, and appropriately notes this is a docs-only change without unit tests.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch eval-search-drive-routing-docs-a970

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented May 13, 2026

CLA assistant check
All committers have signed the CLA.

@github-actions github-actions Bot added the size/M Single-domain feat or fix with limited business impact label May 13, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 67.02%. Comparing base (e511404) to head (7585996).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #864   +/-   ##
=======================================
  Coverage   67.02%   67.02%           
=======================================
  Files         569      569           
  Lines       53508    53508           
=======================================
  Hits        35864    35864           
  Misses      14649    14649           
  Partials     2995     2995           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Change-Id: I000c2d56962e6da2a7ef77d986c2eb73ec286546
@BytedanceSearch BytedanceSearch force-pushed the eval-search-drive-routing-docs-a970 branch from fbb3e42 to 7585996 Compare May 19, 2026 06:33
@BytedanceSearch BytedanceSearch marked this pull request as ready for review May 19, 2026 09:14
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (2)
skills/lark-drive/references/lark-drive-search.md (2)

30-30: 💤 Low value

Consider adding a note about the <YYYY-MM-DD> placeholder format.

The use of <YYYY-MM-DD> placeholder on line 30 is correct per the guidance on line 209, but readers might find it clearer if the mapping table included a brief note indicating that angle-bracketed dates are runtime placeholders. Line 37 shows a concrete example for a specific historical month (March 2026), which provides a good contrast, but the distinction could be more explicit.

📝 Suggested clarification

Option 1: Add a footnote after the table explaining placeholder notation.

Option 2: Add an inline note to line 30's example:

-| 我这月创建的所有文档,按类型分类统计 | `lark-cli drive +search --query "" --mine --created-since "<YYYY-MM-DD>" --created-until "<YYYY-MM-DD>"` |
+| 我这月创建的所有文档,按类型分类统计 | `lark-cli drive +search --query "" --mine --created-since "<YYYY-MM-DD>" --created-until "<YYYY-MM-DD>"` (运行时计算) |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@skills/lark-drive/references/lark-drive-search.md` at line 30, Add a short
clarification that angle-bracketed dates are runtime placeholders and must
follow the YYYY-MM-DD format for the table row containing the command `lark-cli
drive +search --query "" --mine --created-since "<YYYY-MM-DD>" --created-until
"<YYYY-MM-DD>"`; implement this by either appending a brief inline note to that
table cell (e.g., "(use YYYY-MM-DD; <> = placeholder)") or adding a footnote
below the table referencing the guidance already documented near the existing
example on line 37 and line 209, so readers clearly understand the placeholder
format.

86-94: 💤 Low value

Consider clarifying "非污染" (non-polluted) evidence.

Line 93 mentions preserving "非污染、可解释的 evidence" but doesn't define what constitutes "polluted" evidence. While the context suggests it relates to irrelevant or misleading results, an example or brief definition would improve clarity.

💡 Suggested clarification

Consider adding a brief explanation:

-每轮扩展都要保留非污染、可解释的 evidence(URL/token/标题/摘要);不能因为某个扩展词搜到高相似标题就跳过证据核验。
+每轮扩展都要保留非污染、可解释的 evidence(URL/token/标题/摘要),即与查询主题直接相关、不包含无关内容的结果;不能因为某个扩展词搜到高相似标题就跳过证据核验。
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@skills/lark-drive/references/lark-drive-search.md` around lines 86 - 94, 在第
93 行把模糊的“非污染、可解释的 evidence”改为一个简短定义并给出示例:说明“非污染”指的是与查询直接相关、可追溯且可验证的证明性片段(例如
URL、检索到的
token、标题、摘要、发布时间),并列出何为“污染”证据以便识别(例如与主题无关或语义漂移的段落、自动生成的低质量内容、缺少来源或付费/受限内容无法验证),同时在同一句里强调保留证据的字段(URL/token/标题/摘要)以便核验并避免因扩展词直接跳过证据核验(在文档中引用“非污染、可解释的
evidence”这一短语以便替换)。
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@skills/lark-drive/references/lark-drive-search.md`:
- Line 30: Add a short clarification that angle-bracketed dates are runtime
placeholders and must follow the YYYY-MM-DD format for the table row containing
the command `lark-cli drive +search --query "" --mine --created-since
"<YYYY-MM-DD>" --created-until "<YYYY-MM-DD>"`; implement this by either
appending a brief inline note to that table cell (e.g., "(use YYYY-MM-DD; <> =
placeholder)") or adding a footnote below the table referencing the guidance
already documented near the existing example on line 37 and line 209, so readers
clearly understand the placeholder format.
- Around line 86-94: 在第 93 行把模糊的“非污染、可解释的
evidence”改为一个简短定义并给出示例:说明“非污染”指的是与查询直接相关、可追溯且可验证的证明性片段(例如 URL、检索到的
token、标题、摘要、发布时间),并列出何为“污染”证据以便识别(例如与主题无关或语义漂移的段落、自动生成的低质量内容、缺少来源或付费/受限内容无法验证),同时在同一句里强调保留证据的字段(URL/token/标题/摘要)以便核验并避免因扩展词直接跳过证据核验(在文档中引用“非污染、可解释的
evidence”这一短语以便替换)。

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: df834028-25d6-4eb4-aa98-7103a0629288

📥 Commits

Reviewing files that changed from the base of the PR and between e511404 and 7585996.

📒 Files selected for processing (1)
  • skills/lark-drive/references/lark-drive-search.md

@github-actions
Copy link
Copy Markdown

🚀 PR Preview Install Guide

🧰 CLI update

npm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@7585996ba631d72340ce1e46931b5bc9464c68b3

🧩 Skill update

npx skills add larksuite/cli#eval-search-drive-routing-docs-a970 -y -g

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/M Single-domain feat or fix with limited business impact

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants